import re


def re_match_value(string, pattern, index = 0):
    # matches = []
    #
    # for match in re.finditer(pattern, string):
    #     matches.append(match.group())

    matches = [match.group(1) for match in re.finditer(pattern, string)]
    return matches[index]